<?php
namespace App\Models\Log;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Notifications\Notifiable;

use App\Models\Def\MainGamePlat;

class Game extends Model
{
    use Notifiable;

    protected static function boot()
    {
        parent::boot();
    }

    public $table = 'log_player_bet_flow';

    const CREATED_AT = 'created_at';

    const UPDATED_AT = 'updated_at';

    public $fillable = [
        'main_game_plat_id',
        'game_name',
        'english_game_name',
        'category',
        'slot_category',
        'slot_game_lines',
        'slot_return_award_rate',
        'slot_is_demo',
        'slot_is_goldpool',
        'game_icon_path',
        'is_web',
        'is_flash',
        'is_wap',
        'is_app_pc',
        'is_app_mobile',
        'is_hall',
        'join_flash_code',
        'join_flash_code_ext',
        'join_web_code',
        'join_web_code_ext',
        'join_hall_code',
        'join_hall_code_ext',
        'record_code',
        'record_code_ext',
        'status',
    ];

    protected $casts = [
        'id'=>'integer',
        'main_game_plat_id' => 'integer',
        'game_name' => 'string',
        'english_game_name' => 'string',
        'category'=>'integer',
        'slot_category' => 'integer',
        'slot_game_lines'=>'integer',
        'slot_return_award_rate'=>'numeric',
        'bet_flow_available' => 'integer',
        'slot_is_demo'=>'integer',
        'slot_is_goldpool' => 'integer',
        'game_icon_path'=>'string',
        'is_web' => 'integer',
        'is_flash'=>'integer',
        'is_wap'=>'integer',
        'is_app_pc' => 'integer',
        'is_app_mobile'=>'integer',
        'game_icon_path'=>'string',
        'is_web' => 'integer',
        'is_hall'=>'integer',
        'join_flash_code' => 'string',
        'join_flash_code_ext'=>'string',
        'join_web_code'=>'string',
        'join_web_code_ext' => 'string',
        'join_hall_code'=>'string',
        'join_hall_code_ext'=>'string',
        'record_code' => 'string',
        'record_code_ext'=>'string',
        'status'=>'integer'
    ];

    public static $rules = [];

    public function MainGamePlat()
    {
        return $this->belongsTo(MainGamePlat::class, 'id', 'main_game_plat_id');
    }
}
